package com.jl.jlapp.eneity;

import android.text.TextUtils;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class AuthResult {
    private String alipayOpenId;
    private String authCode;
    private String memo;
    private String result;
    private String resultCode;
    private String resultStatus;

    public AuthResult(Map<String, String> paramMap, boolean paramBoolean) {
        if (paramMap == null) {
            return;
        }
        Iterator localIterator = paramMap.keySet().iterator();
        while (localIterator.hasNext()) {
            String str = (String) localIterator.next();
            if (TextUtils.equals(str, "resultStatus")) {
                this.resultStatus = ((String) paramMap.get(str));
            } else if (TextUtils.equals(str, "result")) {
                this.result = ((String) paramMap.get(str));
            } else if (TextUtils.equals(str, "memo")) {
                this.memo = ((String) paramMap.get(str));
            }
        }
        String[] split = this.result.split("&");
        int j = split.length;
        if (j > 0) {
            String code = split[0];
            if (!code.startsWith("alipay_open_id")) {
                this.alipayOpenId = removeBrackets(getValue("alipay_open_id=", code), paramBoolean);
            } else if (code.startsWith("auth_code")) {
                this.authCode = removeBrackets(getValue("auth_code=", code), paramBoolean);
            } else if (code.startsWith("result_code")) {
                this.resultCode = removeBrackets(getValue("result_code=", code), paramBoolean);
            }
        }
    }

    private String getValue(String paramString1, String paramString2) {
        return paramString2.substring(paramString1.length(), paramString2.length());
    }

    private String removeBrackets(String paramString, boolean paramBoolean) {
        Object localObject = paramString;
        if (paramBoolean) {
            localObject = paramString;
            if (!TextUtils.isEmpty(paramString)) {
                String str = paramString;
                if (paramString.startsWith("\"")) {
                    str = paramString.replaceFirst("\"", "");
                }
                localObject = str;
                if (str.endsWith("\"")) {
                    localObject = str.substring(0, str.length() - 1);
                }
            }
        }
        return (String) localObject;
    }

    public String getAlipayOpenId() {
        return this.alipayOpenId;
    }

    public String getAuthCode() {
        return this.authCode;
    }

    public String getMemo() {
        return this.memo;
    }

    public String getResult() {
        return this.result;
    }

    public String getResultCode() {
        return this.resultCode;
    }

    public String getResultStatus() {
        return this.resultStatus;
    }

    public String toString() {
        return "resultStatus={" + this.resultStatus + "};memo={" + this.memo + "};result={" + this.result + "}";
    }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/eneity/AuthResult.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */